﻿using ACC.Device;
using ACC.Device.Client;
using ACC.Device.Iot.Mqtt;
using ACC.Device.PLC;
using ACC.LineDevice.KukaPack;
using ACC.Server.Script;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Script
{
    public class ServerInitEx : ServerInit
    {
        public override void Init()
        {
            base.Init();

            ACCDeviceFactory.RegisterDriverType("SIEMENS", typeof(SiemensDriverKukaPack));
            ACCDeviceFactory.RegisterDeviceType("SIEMENS", typeof(SiemensDeviceKukaPack));

            ACCDeviceFactory.RegisterDriverType("MQTT", typeof(MqttDriver));
            ACCDeviceFactory.RegisterDeviceType("MQTT", typeof(MqttDevice));

            ACCDeviceFactory.RegisterDriverType("TERMINAL", typeof(ClientDriver)); //TERMINAL
            ACCDeviceFactory.RegisterDeviceType("TERMINAL", typeof(ClientDevice));

            ACC.Business.Process.PartTypeTagProcess.StartYear = 2010;

            // 没有 I, O, Q, U, Z
            // 0 代表31日
            ACC.Business.Process.PartTypeTagProcess.data_D = new char[] 
            { 
                '1','2','3','4','5','6','7','8','9',
                'A','B','C','D','E','F','G',
                'H','J','K','L','M','N',
                'P','R','S','T',
                'V','W','X', 'Y', '0'
            };

            // 没有 I, O, Q, U, Z
            ACC.Business.Process.PartTypeTagProcess.data_CY = new char[] 
            {
                '0','1','2','3','4','5','6','7','8','9',
                'A','B','C','D','E','F','G',
                'H','J','K','L','M','N',
                'P','R','S','T',
                'V','W','X','Y'
            };
        }
    }
}
